package ma.ac.onousc.gestionfi.EngagementPaiement.model.DAO.DAOBean;

import java.util.List;

import javax.ejb.Stateless;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;

import ma.ac.onousc.gestionfi.EngagementPaiement.model.TypeEngagement;
import ma.ac.onousc.gestionfi.EngagementPaiement.model.TypePrestation;
import ma.ac.onousc.gestionfi.EngagementPaiement.model.DAO.TypePrestationDAO;
import ma.ac.onousc.gestionfi.budget.model.DAO.DAOBean.GenericEJB3Bean;

@Stateless
@TransactionAttribute(TransactionAttributeType.SUPPORTS)
public class TypePrestationDAOBean extends GenericEJB3Bean<TypePrestation, Integer> implements
TypePrestationDAO {

	@SuppressWarnings("unchecked")
	@Override
	public List<TypePrestation> findByTypeEngagement(TypeEngagement te) {

		return this.getEntityManager().createNamedQuery("TypeEngagement.findByTypeEngagement")
				.setParameter("te", te).getResultList();
	}

}